package com.hzhr.iot.toll.controller;

import com.hzhr.iot.core.annotation.ApiImplicitInternalParams;
import com.hzhr.iot.core.annotation.Author;
import com.hzhr.iot.toll.controller.base.BaseController;
import com.hzhr.iot.toll.model.gasUser_basicInfo.GasUser_BasicInfoGetModel;
import com.hzhr.iot.toll.service.GasUser_BasicInfoService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;

@Api(tags = "GasUser_BasicInfo", description = "燃气用户的基础信息")
@RestController
@RequestMapping(value = "")
public class GasUser_BasicInfoController extends BaseController {
    @Autowired
    GasUser_BasicInfoService gasUser_basicInfoService;

    //region /gas-users/basic-infos GET
    //region swagger响应码 : get
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get
    @ApiOperation(value="查询燃气用户的基本信息(脱敏)", notes="查询燃气用户的基本信息(脱敏)  \n术语 :  \n脱敏: name属性只保留第一个字符, address属性隐藏数字  \n简介 : 查询燃气用户的基本信息(脱敏)  \n步骤 :  \n1. 查询燃气用户 : (√)  \n 根据请求条件参数查询燃气用户(GAS_USER)对象集合gasUserList_1;  \n2. 脱敏基本信息 :  (√)  \n 脱敏gasUserList_1的元素的基本信息;  \n3. 返回信息 : (√)  \n 根据条件参数和脱敏后的gasUserList_1生成结果对象并返回;  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_id", value = "筛选条件 : where GasUser_BasicInfoModel.id = #{equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "equal_code", value = "筛选条件 : where GasUser_BasicInfoModel.code = #{equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "equal_userId", value = "筛选条件 : where GasUser_BasicInfoModel.userId = #{equal_userId}",required = false, dataType = "int", paramType = "query"),

    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_id", value = "筛选条件 : where GasUser_BasicInfoModel.id = #{_equal_id}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_code", value = "筛选条件 : where GasUser_BasicInfoModel.code = #{_equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_equal_companyId", value = "筛选条件 : where GasUser_BasicInfoModel.companyId = #{_equal_companyId}",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_equal_userId", value = "筛选条件 : where GasUser_BasicInfoModel.userId = #{_equal_userId}",required = false, dataType = "int", paramType = "query"),

    })
    //endregion
    //region 请求 : get
    @RequestMapping(value = "/gas-users/basic-infos", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<GasUser_BasicInfoGetModel> get(@RequestParam @ApiIgnore Map<String, Object> query) throws Exception {
        GasUser_BasicInfoGetModel responseBody = gasUser_basicInfoService.get(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
    //region /v1/gas-users/basic-infos GET
    //region swagger响应码 : get1
    @ApiResponses({
            @ApiResponse(code = 200, message = "成功"),
    })
    //endregion
    //region swagger说明 : get1
    @ApiOperation(value="查询燃气用户的基本信息", notes="查询燃气用户的基本信息  \n步骤 :  \n1. 查询燃气用户 : (√)  \n 根据请求条件参数查询燃气用户(GAS_USER)对象集合gasUserList_1;  \n2. 返回信息 : (√)  \n 根据条件参数和脱敏后的gasUserList_1生成结果对象并返回;  \n",produces = "application/json")
    //endregion
    //region swagger参数 : get1
    @ApiImplicitParams({
            @ApiImplicitParam(name = "token", value = "令牌",required = true, dataType = "string", paramType = "header"),

            @ApiImplicitParam(name = "show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "is_paging", value = "是否分页", defaultValue = "false",required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "equal_code", value = "筛选条件 : where GasUser_BasicInfoModel.code = #{equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "in_id", value = "筛选条件 : where GasUser_BasicInfoModel.id in #{in_id}",required = false, dataType = "int", paramType = "query"),
    })
    @ApiImplicitInternalParams({
            @ApiImplicitParam(name = "_token", value = "令牌",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-id", value = "用户编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-code", value = "用户代码",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-name", value = "用户名",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-company-id", value = "公司编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-dept-id", value = "部门编号",required = true, dataType = "int", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-user-type", value = "用户类型(关联: common_service.options.code, typeCode = 'USER_TYPE')",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-id", value = "交易流水号",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-transaction-type", value = "交易类型",required = true, dataType = "string", paramType = "header"),
            @ApiImplicitParam(name = "_hzhr-access-mode", value = "访问模式 0:一般 1:全局",defaultValue = "0", required = false, dataType = "int", paramType = "header"),

            @ApiImplicitParam(name = "_show", value = "展示形式 one:展示一个,list:展示列表,null(空值):不展示", required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_show_total", value = "是否展示总数", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_show_info", value = "是否展示详情", defaultValue = "false", required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_page", value = "页数", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_count", value = "每页数量", defaultValue = "1",required = false, dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "_is_paging", value = "是否分页", defaultValue = "false",required = false, dataType = "boolean", paramType = "query"),
            @ApiImplicitParam(name = "_equal_code", value = "筛选条件 : where GasUser_BasicInfoModel.code = #{_equal_code}",required = false, dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "_in_id", value = "筛选条件 : where GasUser_BasicInfoModel.id in #{_in_id}",required = false, dataType = "int", paramType = "query"),

    })
    //endregion
    //region 请求 : get1
    @RequestMapping(value = "/v1/gas-users/basic-infos", method = RequestMethod.GET)
    //endregion
    @Author
    public ResponseEntity<GasUser_BasicInfoGetModel> get1(@RequestParam @ApiIgnore Map<String, Object> query) throws Exception {
        GasUser_BasicInfoGetModel responseBody = gasUser_basicInfoService.get1(initHeader(), query);
        return new ResponseEntity<>(responseBody, HttpStatus.OK);
        //endregion
    }
    //endregion
}















































































































































































































































































